package com.lzj.mallchat.common.common.utils;

import com.lzj.mallchat.common.common.domain.dto.RequestInfo;

/**
 * @Description 请求上下文
 * @author 罗振军
 * @version V1.0
 * @Package com.lzj.mallchat.common.common.utils
 * @date 2024/8/20 11:35
 */

public class RequestHolder {
    public static final ThreadLocal<RequestInfo> threadLocal = new ThreadLocal<RequestInfo>();
    public static void set(RequestInfo requestInfo) {
        threadLocal.set(requestInfo);
    }
    public static RequestInfo get() {
        return threadLocal.get();
    }
    public static void remove() {
        threadLocal.remove();
    }
}
